<?php
/**
 * Created by yan.
 * User: Administrator
 * Date: 2019-10-28
 * Time: 下午 2:52
 */

namespace App\Lib\PHPExcel\ManuOrder;

use App\Lib\PHPExcel\ExcelHandle;

class Qingyun extends ExcelHandle
{

    public function arrange($origin_arr)
    {

        $arr = [
            0 => [
                '标题', '文章链接','作者', '发布时间'
            ]
        ];
        $i = 1;
        foreach ($origin_arr as $data) {
            $arr[$i]['标题'] = $data->title;
            $arr[$i]['文章链接'] = $data->article_url;
            $arr[$i]['作者'] = $data->author;
            $arr[$i]['发布时间'] = $data->pub_date;

            $i++;
        }

        return $arr;
    }


}